//
//  THBabySeriviceTableViewCell.m
//  TreeHole
//
//  Created by apple on 2020/9/21.
//  Copyright © 2020 stoneobs. All rights reserved.
//

#import "THBabyUserHomeTableViewCell.h"

@interface THBabyUserHomeTableViewCell()
@property(nonatomic, strong) UIImageView                     *iconImageView;/**<  */
@property(nonatomic, strong) STLabel                     *nameLable;/**<  */
@property(nonatomic, strong) STLabel                     *saleLable;/**<  */

@end
@implementation THBabyUserHomeTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self == [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self stoneobs_ui_configSubView];
    }
    return self;
}
+ (CGFloat)stoneobs_ui_cell_height{
    return 100 + 12;
}
#pragma mark --configSubView
- (void)stoneobs_ui_configSubView{
    UIImageView * stoneobs_ui_imageView = [[UIImageView alloc] initWithFrame:CGRectMake(15, 10, 100, 100)];
    stoneobs_ui_imageView.image = [UIImage imageNamed:@"ic_none"];
    [self.contentView addSubview:stoneobs_ui_imageView];
    self.iconImageView = stoneobs_ui_imageView;
    stoneobs_ui_imageView.layer.cornerRadius = 4;
    stoneobs_ui_imageView.clipsToBounds = YES;
    CGFloat left = stoneobs_ui_imageView.right + 10;
    
    ({
        STLabel * stoneobs_ui_label = [[STLabel alloc] initWithFrame:CGRectMake(left, stoneobs_ui_imageView.top, 200, 20)
                                                                text:@"sasd"
                                                           textColor:STONEOBS_UI_FIRST_TEXT_COLOR
                                                                font:13
                                                         isSizetoFit:NO
                                                       textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:stoneobs_ui_label];
        self.nameLable = stoneobs_ui_label;
    });
    
    

    
    ({
        STLabel * stoneobs_ui_label = [[STLabel alloc] initWithFrame:CGRectMake(left, self.nameLable.bottom + 5, 200, 20)
                                                                text:@"预售"
                                                           textColor:STONEOBS_UI_SECEND_TEXT_COLOR
                                                                font:13
                                                         isSizetoFit:NO
                                                       textAlignment:NSTextAlignmentLeft];
        [self.contentView addSubview:stoneobs_ui_label];
        self.saleLable = stoneobs_ui_label;
    });
    
}
- (void)setModel:(THMajorUserModel *)model{
    _model = model;
    [self.iconImageView sd_setImageWithURL:model.img.mj_url];
    self.nameLable.text = model.name;
    self.saleLable.text = [NSString stringWithFormat:@"专家数量: %@",model.num];
}
@end
